<?php

/* @var $this yii\web\View */

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use dosamigos\datepicker\DatePicker;

$this->title = '设置静态分红';
$this->params['breadcrumbs'][] = $this->title;

?>
<!-- page title -->
<div class="page-title">
  <div>
    <h1><i class="fa fa-trophy"></i> 设置静态分红</h1>
    <p style="font-style:normal;">会员NEA账户中的金额数+会员NEA账户中的金额数X以下数值放入相应的会员NEA基金账户中；一周静态分红一次，分红百分比在-2.00% ~ 6.00%之间（取值到小数点后两位，可以控制分红的取值（在后台输入任意-2.00% ~ 6.00%的一个数字，如0.0156或-0.0247））；
      指定分红时间：XX年XX月XX日XX时XX分XX秒;可以关闭分红和继续分红；以上的数值的变化，走势图也要相应变化。</p>
  </div>
  <!--div style="width:300px;">
    <ul class="breadcrumb">
      <li><i class="fa fa-home fa-lg"></i></li>
      <li><a href="#">设置静态分红</a></li>
    </ul>
  </div-->
</div>
<!-- page title end-->

<!-- page body start -->
<div class="card">
<?php $form = ActiveForm::begin(); ?>
    <?php
      if(isset($tip)&&$tip===true){
        if($model->hasErrors()){
    ?>
          <div class="alert alert-danger" role="alert">
            <?php
                foreach($model->getErrors("") as $key=>$value){
                  echo $value."<br>";
                }
            ?>
          </div>
    <?php
        }else{
    ?>
          <div class="alert alert-success" role="alert">分红设置成功！</div>
    <?php
        }
      }
    ?>
    <!--$form->field($model, 'data_datetime')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'9999-99-99 99:99:99'])->label('静态分红时间') -->

    <?= $form->field($model, 'fenhong_rate')->widget(\yii\widgets\MaskedInput::className(), ['mask' =>'(0.09{0,3}|-0.09{0,3})'])->label('静态分红值') ?>

    <div class="animated-checkbox">
      <label class="semibold-text">
      <?= $form->field($model, 'is_stop_fenhong')->checkbox(['label' => '<span class="label-text">关闭分红</span>']) ?>
      </label>
    </div>

    <div class="animated-checkbox">
      <label class="semibold-text">
        <?= $form->field($model, 'is_fenhong_exec')->checkbox(['label' => '<span class="label-text">进行实际分红账户划拨</span>']) ?>
      </label>
    </div>

    <div class="form-group">
        <?= Html::submitButton('提交', ['class' => 'btn btn-warning']) ?>
    </div>

<?php ActiveForm::end(); ?>
</div>
<!-- page body end-->
